﻿using System;
using System.Data;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using FineUI;
using Maticsoft.BLL;
using Maticsoft.Model;

namespace FineUI.Examples
{
    public partial class User_Query_Notice : System.Web.UI.Page
    {
        DataSet GetNoticeInformaiton()
        {
            Maticsoft.BLL.Notice NT = new Maticsoft.BLL.Notice();
            DataSet DSNotice = NT.GetAllList();
            DataView DVNotice = DSNotice.Tables[0].DefaultView;

            Grid1.DataSource = DVNotice;
            Grid1.DataBind();
            return DSNotice;
        }

        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["UserName"] == null)
            {
                Response.Redirect("~/login.aspx");
                return;
            }
            GetNoticeInformaiton();

        }

        protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
        {
            Grid1.PageIndex = e.NewPageIndex;
            GetNoticeInformaiton();

        }

        protected void Grid1_RowCommand(object sender, GridCommandEventArgs e)
        {


        }
    }
}